
import java.awt.*;
import java.awt.event.*;

import javax.swing.*;

public class Aboutbox extends JDialog implements ActionListener{

	
	public static JButton closeButton;
	public static JLabel bkground;
	public static JLabel info;
	public static JLabel info2;
	public static JLabel info3;
	
	public static ImageIcon closeIcon_up;
	public static ImageIcon closeIcon_down;
	public static ImageIcon bgImage;
	
	public Aboutbox(JFrame parent)
	{
		info = new JLabel();
		info2 = new JLabel();
		info3 = new JLabel();
		bkground = new JLabel();
		closeIcon_up = new ImageIcon("images/closewin_button_up.jpg");
		closeIcon_down = new ImageIcon("images/closewin_button_down.jpg");
		bgImage = new ImageIcon("images/aboutboxbg.jpg");
		closeButton = new JButton();
		
		closeButton.setIcon(closeIcon_up);
		closeButton.setPressedIcon(closeIcon_down);
		bkground.setIcon(bgImage);
		info.setText(" Recyclebot Control Client.");
		info.setForeground(Color.WHITE);
		info2.setText(" (Version) 0.0.5");
		info2.setForeground(Color.WHITE);
		info3.setText(" Email Support: butlerb@student.gvsu.edu");
		info3.setForeground(Color.WHITE);
		
		setLayout(null);
		setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
		setSize(400, 560);
		
		bkground.setBounds(0,0,400,600);
		closeButton.setBounds(270,-2,120,120);
		info.setBounds(25, 160, 200, 25);
		info2.setBounds(25,175,200,25);
		info3.setBounds(25,190,300,25);
		
		closeButton.setBorderPainted(false);
		closeButton.addActionListener(this);
		
		add(info3);
		add(info2);
		add(info);
		add(closeButton);
		add(bkground);
		
		setVisible(true);
	}

	@Override
	public void actionPerformed(ActionEvent arg0) {
		// TODO Auto-generated method stub
		JButton button = (JButton)arg0.getSource();
		
		if(button == closeButton)
		{
			dispose();
		}
	}

}
